package web.gkw.action;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import web.gkw.model.Technique;
import web.gkw.service.GeneralService;
import web.gkw.service.TechniqueService;

import com.opensymphony.xwork2.ActionSupport;

@Component
public class TechniqueDetail extends ActionSupport {
	private int id;
	@Resource
	private TechniqueService techniqueService;
	private Technique technique;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public TechniqueService getTechniqueService() {
		return techniqueService;
	}
	public void setTechniqueService(TechniqueService techniqueService) {
		this.techniqueService = techniqueService;
	}
	public Technique getTechnique() {
		return technique;
	}
	public void setTechnique(Technique technique) {
		this.technique = technique;
	}
	
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		technique = techniqueService.getTechnique(id);
		return "show";
	}
	
}
